<script setup lang="ts">
import { PropType, reactive } from 'vue'
import type { cCommentData } from '@/api/comment/types'
import { Descriptions } from '@/components/Descriptions'
import { useI18n } from '@/hooks/web/useI18n'
import { ElTag } from 'element-plus'
import { DescriptionsSchema } from '@/types/descriptions'

const { t } = useI18n()

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<cCommentData>>,
    default: () => null
  }
})

const schema = reactive<DescriptionsSchema[]>([
  {
    field: 'productName',
    label: '商品名称'
  },
  {
    field: 'createDate',
    label: '上传时间'
  },
  {
    field: 'userNames',
    label: '上传人'
  },
  {
    field: 'currentpriceProduct',
    label: '商品售价'
  },
  {
    field: 'searchKeywords',
    label: '关键字',
  },
  {
    field: 'categoryName',
    label: '商品分类',
  },
  {
    field: 'productCode',
    label: '商品编号',
  },
  {
    field: 'discount',
    label: '优惠券',
  },
  {
    field: 'productSate',
    label: '审核状态',
  },
  {
    field: 'states',
    label: '商品是否上线',
  },
  {
    field: 'productSales',
    label: '商品销量',
  },
  {
    field: 'productLabel',
    label: '商品标签',
  },
  {
    field: 'ensure',
    label: '服务保证',
  },
  {
    field: 'fabuloues',
    label: '点赞量',
  },
  {
    field: 'collectionVolumes',
    label: '收藏量',
  },
  {
    field: 'hits',
    label: '点击量',
  },
  {
    field: 'productDescription',
    label: '内容',
    span: 24
  }
])
</script>

<template>
  <Descriptions :schema="schema" :data="currentRow || {}">
    <template #importance="{ row }: { row: cCommentData }">

    </template>
  </Descriptions>
</template>
